import React from 'react'
import styles from './App.module.css'
import { FSon } from './FSon'
import { CSon } from './CSon'

export class Header extends React.Component {
  //初始化状态
  state = {
    message: '回来吃饭',
    info: {
      id: 1,
      name: 'hali',
    },
  }

  render() {
    console.log('父亲', this)

    const { message, info } = this.state
    return (
      <div className={styles.one}>
        <div>父</div>
        <FSon msg={message} {...info} />
        <CSon msg={message} {...info} />
      </div>
    )
  }
}
